Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enhance CSP implementation and dependencies #84

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

warnyul
Copy link
Owner

@warnyul warnyul commented Dec 9, 2024

  • Dependencies:

    • Added @melloware/csp-webpack-plugin for improved CSP handling.
    • Introduced dompurify for safer DOM manipulation.
    • Added trusted-types to enhance script security.
  • Webpack Configuration:

    • Replaced custom CSP plugin with @melloware/csp-webpack-plugin.
    • Configured crossOriginLoading: 'anonymous' for improved script integrity.
  • Caching:

    • Updated Cache-Control header values to include both max-age and s-maxage for enhanced caching strategies.
  • Other Changes:

    • Updated package.json and package-lock.json to reflect added and updated dependencies.
    • Integrated stricter CSP policies with subresource integrity.

Impact:

  • Strengthens security against XSS attacks.
  • Optimizes caching and delivery of static assets.
  • Aligns project with modern web security standards.

- **Dependencies**:
  - Added `@melloware/csp-webpack-plugin` for improved CSP handling.
  - Introduced `dompurify` for safer DOM manipulation.
  - Added `trusted-types` to enhance script security.

- **Webpack Configuration**:
  - Replaced custom CSP plugin with `@melloware/csp-webpack-plugin`.
  - Configured `crossOriginLoading: 'anonymous'` for improved script integrity.

- **Caching**:
  - Updated `Cache-Control` header values to include both `max-age` and `s-maxage` for enhanced caching strategies.

- **Other Changes**:
  - Updated `package.json` and `package-lock.json` to reflect added and updated dependencies.
  - Integrated stricter CSP policies with subresource integrity.

**Impact**:
- Strengthens security against XSS attacks.
- Optimizes caching and delivery of static assets.
- Aligns project with modern web security standards.
@warnyul warnyul added the do not merge Indicates the pull request is not ready to be merged due to pending reviews, testing, or blockers. label Dec 9, 2024
@warnyul warnyul self-assigned this Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

Visit the preview URL for this PR (updated for commit 991e64c):

https://bvarga-fe600--pr84-csp-2-0qs98x2e.web.app

(expires Mon, 16 Dec 2024 08:34:57 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a3b1098a9eaf0750a134a339972f1df2a3969a8d

@warnyul warnyul marked this pull request as draft December 9, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Indicates the pull request is not ready to be merged due to pending reviews, testing, or blockers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant